package com.wyn.common.utils;


import lombok.Data;

import java.io.Serializable;

/**
 * Json格式的数据进行响应
 */
@Data
public class R<E> implements Serializable {
    /*状态码*/
    private Integer code;
    /*描述信息*/
    private String message;
    /*数据*/
    private E data;

    public R() {
    }

    public R(E data) {
        this.data = data;
    }

    public R(Integer code,String message) {
        this.code = code;
        this.message = message;
    }

    public R(Integer code, String message, E data) {
        this.code = code;
        this.message = message;
        this.data = data;
    }
}

